package org.jfk.sys.user;

import org.jfk.core.BaseValidator;
import org.jfk.core.controller.BaseController;

import com.jfinal.core.Controller;

public class UserValidator extends BaseValidator {

	@Override
	protected void validate(Controller c) {
		this.validateIdCardPattern("user.idCard", "valid_err", "身份证号码不合法");

	}

	@Override
	protected void handleError(Controller c) {
		BaseController bc = (BaseController)c;
		String valid_err = bc.getRequest().getAttribute("valid_err").toString();
		bc.returnError(valid_err);
	}

}
